import Cookies from "js-cookie";
export const DB_TOKEN = 'db_man'
// 获取token
export const getToken = () => {
  return Cookies.get(DB_TOKEN) || '';
}
// 设置token
export const setToken = (key = DB_TOKEN, token: string) => {
  return Cookies.set(key, token, { expires: 7 }); // 有效期为7天
}
// 删除token
export const removeToken = (key = DB_TOKEN) => {
  return Cookies.remove(key);
}
//